


DEF VAR nbr LIKE pod_req_nbr . 
DEF VAR ln LIKE pod_req_line .
DEF VAR amt LIKE pod_qty_ord .

INPUT FROM VALUE("c:\book1.csv") .

OUTPUT TO c:\b.txt .

REPEAT ON ERROR UNDO, LEAVE WITH FRAME a DOWN STREAM-IO :

    IMPORT DELIMITER "," nbr ln amt NO-ERROR.

    FIND FIRST rqd_ NO-LOCK WHERE rqd_nbr = nbr AND rqd_line = ln NO-ERROR.
    DISP rqd_nbr rqd_line rqd_req_qty WITH FRAME a  .

    FOR EACH pod_ NO-LOCK WHERE pod_req_nbr = rqd_nbr AND pod_req_line = rqd_line :
        DISP pod_nbr pod_line pod_qty_ord WITH FRAME a .
        DOWN 1 WITH FRAME a .

    END.
END.
